package com.example.layui.demo.mapper;

import com.example.layui.demo.entity.Article;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.Mapping;

import java.util.List;

@Mapper
@Repository
public interface TestMapper {

    @Delete("delete from t_article where id=#{id}")
    int delArticlebyId(Integer id);

    @Update("update t_article set title=#{title},categories=#{categories},created=#{created} where id=#{id}")
    int updateArticle(Article Article);

    int deleteByIds(int[] ids);
    List<Article> getArticleList1(Article Article);

}
